<?php  
class A extends Service {  

    public function init(){ 
        $this->worker([A::class,'AA']);
        $this->worker([A::class,'BB']); 
        $this->worker([A::class,'BB']); 
        $this->worker([A::class,'BB']); 
        $this->worker([A::class,'BB']); 
        $this->worker([A::class,'BB']); 
        $this->worker([A::class,'BB']); 
    }


    public function AA(){ 
        echo ">AAAAAAAAAAAAAAAAAA:".$this->coid."\n"; 
        yield self::delay(0.001);
        echo "<AAAAAAAAAAAAAAAAAA:".$this->coid."\n";  
    }
    public function BB(){ 
        echo ">BBBBBBBBBBBBBBBBBB:".$this->coid."\n";  
        //xdebug_disable();
        yield self::delay(22);
        //xdebug_enable();
        echo "<BBBBBBBBBBBBBBBBBB:".$this->coid."\n";  
    }
 
    public function w1(){ 
        $co = $this->coid;
        echo "Start:$co \n";
        yield self::delay(0.01);
        echo "END:$co\n";
    }
    public function w2(){
        $co = $this->coid;
        echo "Start:$co \n";
        yield self::delay(99);
        echo "END:$co\n"; 
    }
}